//
//  RoomInfoBarView.m
//  Karaoke
//
//  Created by 蒋 浩锋 on 12-8-13.
//  Copyright (c) 2012年 Jiang Haofeng. All rights reserved.
//

#import "RoomInfoBarView.h"
#import "SocketDataHandle.h"
#import "DataCenter.h"

@implementation RoomInfoBarView
{
    __weak IBOutlet UIImageView *syLogo;
    __weak IBOutlet UIImageView *sdLogo;
    
}
@synthesize lblRoomName;
@synthesize lblDingFangRen;
@synthesize lblYiXiaoFei;
@synthesize lblZuiDiXiaoFei;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (id) initWithXib
{
    self = [[[NSBundle mainBundle] loadNibNamed:@"RoomInfoBarView" owner:self options:nil] lastObject];
    
    if (self)
    {
        if (OEM_FLAG == 1)
        {
            sdLogo.hidden = NO;
            syLogo.hidden = YES;
        }
//        self.lblRoomName.shadowColor = self.lblRoomName.textColor;
//        self.lblDingFangRen.shadowColor = self.lblDingFangRen.textColor;
//        lblYiXiaoFei.shadowColor = lblYiXiaoFei.textColor;
//        lblZuiDiXiaoFei.shadowColor = lblZuiDiXiaoFei.textColor;
        self.lblYiXiaoFei.text = [SocketDataHandle sharedInstance].roomState.XiaoFeiJinE;
        self.lblZuiDiXiaoFei.text = [SocketDataHandle sharedInstance].roomState.LowLimitMoney;
        self.lblDingFangRen.text = [SocketDataHandle sharedInstance].roomState.ReserveClerk.length > 0 ? [SocketDataHandle sharedInstance].roomState.ReserveClerk : @"客订";
        self.lblRoomName.text = [DataCenter sharedInstance].roomNo;
    }
    
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
